<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="AJAXEnabledWebApplication2._Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>WebService Analyser</title>
    <link href="../CustomCss.css" type="text/css" rel="stylesheet" />
     <script type="text/javascript">
  
    
    
    function fPopulateRequest(value)
    {
        //alert(value);
      __doPostBack('updpnlRequest','NodeClick|' + value);
      
    }


  function fPopulateFieldValue(value,nodevalue)
    {
       

        
        document.getElementById('txtXPath').value = value;
        
        document.getElementById('txtValue').value  = nodevalue;
        
      //__doPostBack('updpnlRequest','NodeClick|' + value);
    }
    
   function fUpdateFieldValue(value)
   {
    
    
    /*var reqxml=$get('<%#hdnXML.ClientID%>');
    var nodevalues= $get('<%#hdnNodeValues.ClientID%>');
    nodevalues.value = nodevalues.value + document.getElementById("txtXPath").value + "," + value + "|";
    $get('<%#hdnNodeValues.ClientID%>').value = nodevalues.value;*/
    //alert(nodevalues.value);
    
    
    __doPostBack('MainTab$TabPanelInvoke$updpnlRequest','AssignValue|' + value + "|" + document.getElementById("txtXPath").value);

   
    
  //document.getElementById('txtMsg').value = value;
   
  }
  
    function fInvoke()
    {
        
        __doPostBack('MainTab$TabPanelInvoke$updpnlRequest','Invoke|' + document.getElementById("txtValue").value + "|" + document.getElementById("txtXPath").value);     

      
      
    }
    
    
    function fSendRequest()
    {
      __doPostBack('MainTab$TabPanelSend$updpnlSend','Send|');        
    
    }
    
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <div style="height:50px;  padding-top:20px; FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#ffcc33,endColorStr=#ffff99);" align="center" >
        <table width="80%">
        <tr>
        <td width="20%" valign="middle" >
            &nbsp;
            <asp:Label ID="Label1" runat="server" Text="WSDL EndPoint" Width="100%"></asp:Label></td>
        <td width="70%" valign="middle">
            <asp:TextBox ID="txtUrl" runat="server" Width="98%"></asp:TextBox></td>
        <td valign="middle" style="width: 5%;" >
            <asp:Button ID="btnGo" Text="Go" runat="server"  /></td>
        <td valign="middle" style="width: 5%;">
        </td>
         
        </tr>
        
        </table>
        </div>
        <cc1:TabContainer ID="MainTab" runat="server" ActiveTabIndex="0" BorderColor="White" CssClass="visoft__tab_xpie7">
            <cc1:TabPanel ID="TabPanelInvoke"  HeaderText="TabPanel1" runat="server" CssClass="visoft__tab_xpie7"  >
            <ContentTemplate>
             <table width="80%">
             <tr>
             <td width="40%" valign="top">
                 Methods<br />
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0">
                            <ProgressTemplate>
                                <asp:Image ID="Image1" runat="server" ImageUrl="~/loading.gif" />
                            </ProgressTemplate>
                        </asp:UpdateProgress>
             </td>
             <td width ="1%"></td>
             <td valign="top">Request
             </td>
             </tr>
        <tr>
        <td width="30%" valign="top" style="height: 600px">
         <asp:UpdatePanel ID="updpnlTreeView" runat="server" UpdateMode="Conditional" >
            <ContentTemplate>
                   <asp:Panel ID="Panel2" runat="server" Height="600px" Width="93%" ScrollBars="Vertical" BorderColor="Blue" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" ForeColor="#FF8000">
                   <asp:TreeView ID="MethodTree" runat="server" Height="100%" Width="89%" BorderColor="#FF8000" BorderStyle="None" Font-Size="Small" BorderWidth="1px" ForeColor="Black" ImageSet="Simple"    >
                       <ParentNodeStyle Font-Bold="False" />
                       <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                       <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                           VerticalPadding="0px" />
                       <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="0px"
                           NodeSpacing="0px" VerticalPadding="0px" />
                   </asp:TreeView>
                </asp:Panel>
            </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID ="btnGo" />
            </Triggers>
        </asp:UpdatePanel>
        </td>
        <td width="1%" style="height: 50%" ></td>
        <td valign="top" style="height: 50%; width: 50%;">
        <asp:UpdatePanel ID="updpnlRequest" runat="server" UpdateMode="Conditional" >
            <ContentTemplate>
            
                <asp:Panel ID="Panel1" runat="server" Height="300px" Width="93%" ScrollBars="Vertical" BorderColor="#C0C0FF" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial">
                    <asp:TreeView ID="InputTree" runat="server" Height="100%" Width="94%" ImageSet="Simple"  >
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                        <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                            VerticalPadding="0px" />
                        <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="0px"
                            NodeSpacing="0px" VerticalPadding="0px" />
                    </asp:TreeView>
                </asp:Panel>
                &nbsp;<br />
            <br />
            <input id="btnInvoke" type="button" value="Invoke" onclick="fInvoke();" /><br />
                  <asp:Panel ID="Panel3" runat="server" Height="300px" Width="300px" ScrollBars="Vertical" BorderStyle="Solid" BorderWidth="1px">
                   <asp:TreeView ID="OutPutTree" runat="server" Height="297px" Width="93%">
                   </asp:TreeView>
                  </asp:Panel>
                <br />
                <br />
                <input id="hdnXML" type="hidden" runat="server" style="width: 371px" />
                <input id="hdnNodeValues" type="hidden" runat="server" style="width: 369px" />
                <input id="hdnParam" type="hidden" runat="server" style="width: 368px" />
                <input id="hdnErrorMessage" type="hidden" runat="server" style="width: 367px" />
                 <input id="hdnMethodName" type="hidden" runat="server" style="width: 371px" />
                 <input id="hdnURL" type="hidden" runat="server" style="width: 368px" /><br />
                <br />
                <br />
                &nbsp;
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="MethodTree" EventName ="SelectedNodeChanged" />
            </Triggers>
        </asp:UpdatePanel>
      </td> 
      <td width="20%" valign="top">
            <textarea id="txtXPath" style="width: 291px; height: 35px;" readonly="readOnly" unselectable="off" wrap="soft"></textarea>
            <input id="txtValue" type="text" onchange="fUpdateFieldValue(this.value);" /></td>
      </tr>
     </table>  
    </ContentTemplate>
    <HeaderTemplate>
        Invoke
    </HeaderTemplate>
    </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanelSend" runat="server" HeaderText="TabPanel2" CssClass="visoft__tab_xpie7">
            <HeaderTemplate>
                Send
            </HeaderTemplate>
            <ContentTemplate>
                    <asp:UpdatePanel ID="updpnlSend" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                        <table width="1000">
                        <tr>
                            <td width="20%"><asp:Label ID="Label2" runat="server" Text="Soap Action"></asp:Label></td>
                            <td width="80%"><asp:TextBox ID="txtSoapAction" runat="server" Width="98%" BackColor="#C0C0FF" ReadOnly="True"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td></td><td><asp:TextBox ID="txtRequest" runat="server" Height="344px" TextMode="MultiLine" Width="98%"></asp:TextBox></td>
                        </tr>
                        <tr>
                        <td></td><td align="right"><input id="btnSend" type="button" value="Send" onclick="fSendRequest();" /></td>
                        </tr>
                        <tr>
                        <td></td><td><asp:TextBox ID="txtResponse" runat="server" Height="423px" TextMode="MultiLine" Width="98%"></asp:TextBox></td>
                        </tr>
                        </table>
              </ContentTemplate>
           </asp:UpdatePanel>
           </ContentTemplate>
         </cc1:TabPanel>
        </cc1:TabContainer><br />
   </form>
</body>
</html>
